@t:6px;
@rx: 4px;

.upload_items {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  overflow: hidden;
  padding-top: @t;
  padding-left: @t;
  border-radius: @rx;
  border: 1px dashed #d9d9d9;
}

.trigger_button {
  width: 100px;
  height: 100px;
  outline: none;
  border: none;
  display: flex;
  cursor: pointer;
  color: #666;
  font-size: 14px;
  margin-right: @t;
  margin-bottom: @t;
  border-radius: @rx;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8f8f8;

  &.upload_item_max {
    width: 100%;
  }
}

:global {
  .ant-form-item-has-error {
    .upload_item_error {
      border-color: #ff4d4f;
    }
  }
}

.trigger_text {
  margin-top: 4px;
}

.upload_item {
  width: 100px;
  height: 100px;
  margin-right: @t;
  margin-bottom: @t;
  border-radius: @rx;
  overflow: hidden;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border: 1px solid #f0f0f0;

  .upload_review,
  .default_view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .upload_review {
    padding: 4px;
  }

  .modal_container {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    opacity: 0;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    transition: opacity .2s ease;
    background-color: rgba(0, 0, 0, .2);
  }

  .upload_review:hover {
    .modal_container {
      opacity: 1;
      visibility: visible;
    }
  }

  .modal_item {
    font-size: 18px;
    color: #ffffff;
    padding: 10px;

    &:hover {
      color: #f40;
    }
  }

  .default_view {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .default_view_text {
    margin-top: 8px;
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
